package vip.bblog.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import vip.bblog.entity.User;
import vip.bblog.service.HelloService;

/**
 * @author <a href="1396513066@qq.com">Yu Yong</a>
 * @version 1.0
 * @date 2020年06月02日 18:07
 * @desc HelloController
 */
@Controller
public class HelloController {

    @Autowired
    private HelloService helloService;

    @RequestMapping("hello")
    @ResponseBody
    public User hello() {
        return helloService.hello();
    }

    @RequestMapping("user")
    @ResponseBody
    public User user(User user){
        return user;
    }

    @RequestMapping("index")
    public String index() {
        return "index";
    }


}
